package com.framework;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
class ValidationResult {
    private boolean valid;
    private String field;
    private String errorCode;
    private String errorMessage;

    public static ValidationResult valid() {
        return new ValidationResult(true, null, null, null);
    }

    public static ValidationResult invalid(String field, String errorCode, String errorMessage) {
        return new ValidationResult(false, field, errorCode, errorMessage);
    }
}